//
//  SVProgressHUD+Extension.swift
//  intelligentconsultation
//
//  Created by William_Xue on 2017/4/24.
//  Copyright © 2017年 EWEll. All rights reserved.
//

import UIKit

class SVProgressHUDHelper {
     public class func configSVProgressHUD() {
        SVProgressHUD.setMinimumSize(CGSize(width: 100, height: 100))
        SVProgressHUD.setDefaultStyle(.dark)
    }
}

extension SVProgressHUD {
    public class func showMessage(_ msg: String!) {
        SVProgressHUD.dismiss()
        SVProgressHUD.setMaximumDismissTimeInterval(2)
        SVProgressHUD.setMinimumDismissTimeInterval(1)
        SVProgressHUD.showInfo(withStatus: msg)
    }
    public class func showSuccess(_ msg: String!) {
        SVProgressHUD.dismiss()
        SVProgressHUD.setMaximumDismissTimeInterval(2)
        SVProgressHUD.setMinimumDismissTimeInterval(1)
        SVProgressHUD.showSuccess(withStatus: msg)
    }
    public class func showError(_ msg: String!) {
        SVProgressHUD.dismiss()
        SVProgressHUD.setMaximumDismissTimeInterval(2)
        SVProgressHUD.setMinimumDismissTimeInterval(1)
        SVProgressHUD.showError(withStatus: msg)
    }
    public class func showErrorMax(_ msg: String!) {
        SVProgressHUD.dismiss()
        SVProgressHUD.setMaximumDismissTimeInterval(2)
        SVProgressHUD.setMinimumDismissTimeInterval(1)
        SVProgressHUD.show(withStatus: msg)
    }
}
